﻿using Application.Dto;
using AutoMapper;
using Domain.Entity;
using Domain.IRepository;
using Domain.Repository;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Application.CFSKService
{
    public class CFSKService : ICFSKService
    {
        private readonly IMapper mapper;
        public ICFSKRepository CFSKRepository { get; set; }
        
        public CFSKService(IMapper mapper, ICFSKRepository CFSKRepository)
        {
            this.mapper = mapper;
            this.CFSKRepository = CFSKRepository;
           
        }

        public List<CFSK> GetCFSK()
        {
            return CFSKRepository.GetCFSK();
        }

        public Task<int> AddCFSK(CFSK cfSK)
        {
           return CFSKRepository.AddCFSK(cfSK);
        }

        public Task<int> UpdateCFSK(CFSK cfSK)
        {
            return CFSKRepository.UpdateCFSK(cfSK);
        }

        public Task<int> DeleteCFSK(int id)
        {
           return CFSKRepository.DeleteCFSK(id);
        }

		public List<CFSK> GetCFSKName(string name)
		{
			return CFSKRepository.GetCFSKName(name);
		}
	}
}
